<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>提交订单信息</title>
    <link href="css/style.css" type="text/css" rel="stylesheet" />
    <script src="js/jquery-1.7.min.js" type="text/javascript"></script>
    <script src="js/common.js" type="text/javascript"></script>

</head>
<body class="index">

<script type="text/javascript">
    var provi=$('#prov');
    $.ajax({
        //请求的路径
        url: '/SanJiLianDongController/getPro',
        //异步请求
        async: true,
        //服务器返回的数据类型
        dataType: 'json',
        contentType: 'application/json;charset=UTF-8',
        success: function (msg) {
            for (var i = 0; i < msg.length; i++) {
                var t2 = msg[i];

                provi.append("<option value='" + t2.id + "'>" + t2.name+ "</option>");

            }
        },
        error: function () {
            alert("你出错了！")
        }
    });

</script>
<div class="top_ad"><div class="w1200"><a href="#" id="close"></a></div></div>

<div class="top">
    <div class="w1200">
        <div class="left">
            ${loginUser.nickname}您好，欢迎光临飞飞商城！
            <c:choose>
            <c:when test="${loginUser.nickname!=null}">
                <a href="/login">[退出]</a>
            </c:when>
            <c:otherwise>
            <a href="login.jsp">[登录]</a></div>
        </c:otherwise>
        </c:choose>
    </div>
    <div class="right">
        <a href="#">我的会员中心</a>|
        <a href="#">收藏夹</a>|
        <a href="#">服务中心</a>|
        <a href="#">在线客服</a>|
        <a href="/OrderController/findUserOrder">购物车</a>
    </div>
    <div class="clear"></div>
</div>
</div>

<div class="head">
    <div class="w1200">
        <div class="logo"><a href="#"></a></div>
        <div class="search">
            <form action="#" class="form">
                <input type="text" value="输入商品关键字" name="keyword" class="txt" onfocus="if(value=='输入商品关键字') {value=''}" onblur="if(value=='') {value='输入商品关键字'}"/>
                <input type="submit" value="搜索" class="sub"/>
            </form>
            <p><a href="#">iphone6s</a>|<a href="#">面膜</a>|<a href="#">婚庆床品</a>|<a href="#">运动鞋</a>|<a href="#">眼霜</a>|<a href="#">月饼</a>|<a href="#">智能手机</a>|<a href="#">连衣裙</a></p>
        </div>
        <div class="s_r">
            <dl>
                <dt><p><a href="/OrderController/findUserOrder">购物车</a></p></dt>
                <dd>客服电话：<b>400-0000-000</b></dd>
            </dl>
        </div>
        <div class="clear"></div>
    </div>
</div>

<div class="menu">
    <div class="w1200">
        <div class="item" id="nav"><a href="#" class="nav">全部商品分类</a>
            <div class="nav_son">
                <ul>
                    <li class="li01"><a href="#">功能产品</a></li>
                    <li class="li02"><a href="#">服装箱包</a></li>
                    <li class="li03"><a href="#">美妆护肤</a></li>
                    <li class="li04"><a href="#">珠宝饰品</a></li>
                    <li class="li05"><a href="#">数码家电</a></li>
                    <li class="li06"><a href="#">食品茶酒</a></li>
                    <li class="li07"><a href="#">运动体育</a></li>
                    <li class="li08"><a href="#">家居家纺</a></li>
                    <li class="li09"><a href="#">生活服务</a></li>
                    <li class="li10"><a href="#">其他</a></li>
                </ul>
            </div>
        </div>
        <div class="item"><a href="/GoodsController/GetAll" class="home">商城首页</a></div>

    </div>
</div>


<div class="w1200">
    <div class="position"><a href="#">首页</a> > <a href="GoodsController/findAllGoods.action">购物车</a></div>

    <div class="shopcar">
        <div class="info_lc"><span class="sp01">我的购物车</span><span class="sp02">填写提交信息表单</span><span class="sp03">在线支付</span></div>
        <form action="/OrderController/submitOrders">
            <dl class="info">
                <dt><span>确认收货地址</span></dt>
                <dd>
                    <div class="item">
                        <font>*</font>收货地址：
                                                                <!-- 省份选择 -->
                                          <select id="prov" name="prov" onchange="showCity(this)">
                                           <option>=请选择省份=</option>
                                          </select>
                                                                <!-- 城市选择 -->
                                          <select id="city" name="city" onchange="showCountry(this)">
                                           <option>=请选择城市=</option>
                                          </select>
                                                                <!-- 区县选择 -->
                                          <select id="country" name="country">
                                           <option>=请选择县区=</option>
                                          </select>

                    详细地址：
                    <input type="text" name="address" class="txt"/></div>
                </dd>
            </dl>

            <dl>
                <dt><span>确认订单信息</span></dt>
                <dd>
                    <table width="100%" cellpadding="0" cellspacing="0" border="0">
                        <tr class="tr_t">

                            <td width="48%">商品</td>
                            <td width="25%">单价</td>
                            <td width="13%">数量</td>
                        </tr>
                        <c:forEach items="${jiesuanCar}" var="sc">
                            <tr class="tr_c">

                                <td>
                                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                        <tr>

                                            <td width="85%">${sc.gTitle}</td>
                                        </tr>
                                    </table>
                                </td>
                                <td class="price">${sc.currentPrice}</td>
                                <td>${sc.buyNumber}</td>
                            </tr>
                        </c:forEach>
                        <tr class="tr_d">
                            <td colspan="7">
                                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                    <tr>
                                        <td width="10%">&nbsp;</td>
                                        <td width="10%">买家留言：</td>
                                        <td width="70%"><input type="text" name="comments" class="msg"/></td>
                                        <td width="13%">应付金额：</td>
                                        <td width="7%" class="all_price">
                                            <font>￥${zonge}</font>
                                            <input type="hidden" name="zonge" value="${zonge}">
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                    <div class="clear"></div>
                </dd>
            </dl>

            <table width="100%" border="0" cellspacing="0" cellpadding="0" class="go_tb">
                <tr>
                    <input type="text" name="cids" value="${cids}">
                    <td width="20%"><a href="/GoodsController/GetAll" class="go_buy">继续购物</a></td>
                    <td width="63%">&nbsp</td>
                    <td width="17%" align="right"><input type="submit" class="code" value="提交订单2"></td>
                </tr>
            </table>
        </form>
        <div class="clear"></div>
    </div>
</div>

<!--footer-->
<div class="footer">
    <div class="f_bz">
        <div class="w1200">
            <dl class="dl01">
                <dt>正品保证</dt>
                <dd>正品护航  购物无忧</dd>
            </dl>
            <dl class="dl02">
                <dt>你消费 我买单</dt>
                <dd>返现购物商城</dd>
            </dl>
            <dl class="dl03">
                <dt>品类丰富</dt>
                <dd>品类齐全 轻松购物</dd>
            </dl>
            <dl class="dl04">
                <dt>特色服务体验</dt>
                <dd>为您呈现不一样的服务</dd>
            </dl>
            <div class="clear"></div>
        </div>
    </div>
    <div class="f_nav">
        <div class="w1200">
            <dl>
                <dt>新手指南</dt>
                <dd>
                    <a href="#">注册新用户</a>
                    <a href="#">商品订购流程</a>
                    <a href="#">会员注册协议</a>
                </dd>
            </dl>
            <dl>
                <dt>付款方式</dt>
                <dd>
                    <a href="#">支付宝支付</a>
                    <a href="#">网上银行支付</a>
                    <a href="#">货到付款</a>
                </dd>
            </dl>
            <dl>
                <dt>常见问题</dt>
                <dd>
                    <a href="#">订单状态</a>
                    <a href="#">发票说明</a>
                </dd>
            </dl>
            <dl>
                <dt>售后服务</dt>
                <dd>
                    <a href="#">退换货政策</a>
                    <a href="#">退换货流程</a>
                    <a href="#">退款说明</a>
                    <a href="#">退换货申请</a>
                </dd>
            </dl>
            <dl>
                <dt>客服中心</dt>
                <dd>
                    <a href="#">常见问题</a>
                    <a href="#">联系客服</a>
                    <a href="#">投诉与建议</a>
                </dd>
            </dl>
            <div class="ewm"><img src="images/home/ico35.png"/></div>
            <div class="ewm"><img src="images/home/ico38.png"/></div>
            <div class="clear"></div>
        </div>
    </div>
    <div class="w1200">
        <div class="bottom">
            <a href="#">关于我们</a>|<a href="#">帮助中心</a>|<a href="#">法律声明</a>|<a href="#">用户协议</a>|<a href="#">联系我们</a>|<a href="#">人才招聘</a>|<a href="#">站点地图</a>

            <p>网络文化经营许可证：粤网文[2015]0295-065号<br />© 2015 深圳易易城科技网络有限公司. 粤ICP备15042543号</p>
            <p class="p02"><img src="images/home/ico25.jpg"/><img src="images/home/ico26.jpg"/><img src="images/home/ico27.jpg"/><img src="images/home/ico36.jpg"/><img src="images/home/ico37.jpg"/></p>
        </div>
    </div>
</div>
<script type="text/javascript">
   var provi=$('#prov');
   var city1=$('#city');
   var country1=$('#country');
    function showCity(provice){
        //此次有bug不能清除上次的记录
        $.ajax({
            //请求的路径
            url: '/SanJiLianDongController/getCity?id='+provice.value,
            //异步请求
            async: true,
            //服务器返回的数据类型
            dataType: 'json',
            contentType: 'application/json;charset=UTF-8',
            success: function (msg) {
                for (var i = 0; i < msg.length; i++) {
                    var t2 = msg[i];

                    city1.append("<option value='" + t2.id + "'>" + t2.name+ "</option>");

                }
            },
            error: function () {
                alert("你出错了！")
            }
        });

    }
    function showCountry(p){
        $.ajax({
            //请求的路径
            url: '/SanJiLianDongController/getCountry?id='+p.value,
            //异步请求
            async: true,
            //服务器返回的数据类型
            dataType: 'json',
            contentType: 'application/json;charset=UTF-8',
            success: function (msg) {
                for (var i = 0; i < msg.length; i++) {
                    var t2 = msg[i];

                    country1.append("<option value='" + t2.id + "'>" + t2.name+ "</option>");

                }
            },
            error: function () {
                alert("你出错了！")
            }
        });
    }

</script>
</body>

</html>

